// =============================================================================
// XPathDebugger And Examples FlexibleCFHedgeEntity.cs
// Copyright (c) 2013 TNTTechnologies Inc.
// =============================================================================

#region

using System;
using System.Xml.Serialization;

#endregion

namespace FINCAD.HES.Common.Entity{
    [Serializable]
    [XmlRoot("FlexibleCFHedge")]
    public class FlexibleCFHedgeEntity{
        //Hedge entity
        private string benchmarkInterestRate;
        private double? dollarOffsetTestingEffectiveness;
        private bool? dollarOffsetTestingStatus;
        private DateTime? endDate;
        private double hedgePercent;
        private int hedgeReportingSpecificationID;
        private string hedgeReportingSpecificationName;
        private string hedgeStartDateValuationType;
        private string hedgedRiskType;
        private bool hedgingInstrumentIsOption;
        private bool hypotheticalGenerated;
        private int hypotheticalIRSpreadsCurveID;
        private bool isPublished = false;
        private string lastCalculationStatus;
        private string name;
        private bool? optionExcludeTimeValue;
        private string optionIntrinsicValueType;
        private string prospectiveTestType;
        private double? regressionFTest;
        private double? regressionRSquare;
        private double? regressionSlope;
        private double? regressionTTest;
        private bool? regressionTestingStatus;
        private int reportingCurrencyID;
        private string retrospectiveTestType;
        private bool shortcutApplies;
        private int sid;
        private DateTime startDate;
        private bool? useCleanFairValue = false;

        [XmlAttribute("SID")]
        public int SID{
            get{
                return this.sid;
            }
            set{
                this.sid = value;
            }
        }

        [XmlAttribute("hedgeReportingSpecificationID")]
        public int HedgeReportingSpecificationID{
            get{
                return this.hedgeReportingSpecificationID;
            }
            set{
                this.hedgeReportingSpecificationID = value;
            }
        }

        [XmlAttribute("name")]
        public string Name{
            get{
                return this.name;
            }
            set{
                this.name = value;
            }
        }

        [XmlAttribute("startDate")]
        public DateTime StartDate{
            get{
                return this.startDate;
            }
            set{
                this.startDate = value;
            }
        }

        [XmlIgnore]
        public DateTime? EndDate{
            get{
                return this.endDate;
            }
            set{
                this.endDate = value;
            }
        }

        [XmlAttribute("hedgePercent")]
        public double HedgePercent{
            get{
                return this.hedgePercent;
            }
            set{
                this.hedgePercent = value;
            }
        }

        [XmlAttribute("shortcutApplies")]
        public bool ShortcutApplies{
            get{
                return this.shortcutApplies;
            }
            set{
                this.shortcutApplies = value;
            }
        }

        [XmlAttribute("hedgeStartDateValuationType")]
        public string HedgeStartDateValuationType{
            get{
                return this.hedgeStartDateValuationType;
            }
            set{
                this.hedgeStartDateValuationType = value;
            }
        }

        [XmlAttribute("isPublished")]
        public bool IsPublished{
            get{
                return this.isPublished;
            }
            set{
                this.isPublished = value;
            }
        }

        [XmlAttribute("lastCalculationStatus")]
        public string LastCalculationStatus{
            get{
                return this.lastCalculationStatus;
            }
            set{
                this.lastCalculationStatus = value;
            }
        }

        [XmlAttribute("hypotheticalGenerated")]
        public bool HypotheticalGenerated{
            get{
                return this.hypotheticalGenerated;
            }
            set{
                this.hypotheticalGenerated = value;
            }
        }

        [XmlAttribute("retrospectiveTestType")]
        public string RetrospectiveTestType{
            get{
                return this.retrospectiveTestType;
            }
            set{
                this.retrospectiveTestType = value;
            }
        }

        [XmlAttribute("prospectiveTestType")]
        public string ProspectiveTestType{
            get{
                return this.prospectiveTestType;
            }
            set{
                this.prospectiveTestType = value;
            }
        }

        [XmlIgnore]
        public bool? OptionExcludeTimeValue{
            get{
                return this.optionExcludeTimeValue;
            }
            set{
                this.optionExcludeTimeValue = value;
            }
        }

        [XmlIgnore]
        public bool? UseCleanFairValue{
            get{
                return this.useCleanFairValue;
            }
            set{
                this.useCleanFairValue = value;
            }
        }

        [XmlIgnore]
        public bool? DollarOffsetTestingStatus{
            get{
                return this.dollarOffsetTestingStatus;
            }
            set{
                this.dollarOffsetTestingStatus = value;
            }
        }

        [XmlIgnore]
        public double? DollarOffsetTestingEffectiveness{
            get{
                return this.dollarOffsetTestingEffectiveness;
            }
            set{
                this.dollarOffsetTestingEffectiveness = value;
            }
        }

        [XmlIgnore]
        public bool? RegressionTestingStatus{
            get{
                return this.regressionTestingStatus;
            }
            set{
                this.regressionTestingStatus = value;
            }
        }

        [XmlIgnore]
        public double? RegressionRSquare{
            get{
                return this.regressionRSquare;
            }
            set{
                this.regressionRSquare = value;
            }
        }

        [XmlIgnore]
        public double? RegressionSlope{
            get{
                return this.regressionSlope;
            }
            set{
                this.regressionSlope = value;
            }
        }

        [XmlIgnore]
        public double? RegressionTTest{
            get{
                return this.regressionTTest;
            }
            set{
                this.regressionTTest = value;
            }
        }

        [XmlIgnore]
        public double? RegressionFTest{
            get{
                return this.regressionFTest;
            }
            set{
                this.regressionFTest = value;
            }
        }

        [XmlAttribute("hedgedRiskType")]
        public string HedgedRiskType{
            get{
                return this.hedgedRiskType;
            }
            set{
                this.hedgedRiskType = value;
            }
        }

        [XmlAttribute("hedgingInstrumentIsOption")]
        public bool HedgingInstrumentIsOption{
            get{
                return this.hedgingInstrumentIsOption;
            }
            set{
                this.hedgingInstrumentIsOption = value;
            }
        }

        [XmlAttribute("optionIntrinsicValueType")]
        public string OptionIntrinsicValueType{
            get{
                return this.optionIntrinsicValueType;
            }
            set{
                this.optionIntrinsicValueType = value;
            }
        }

        [XmlAttribute("benchmarkInterestRate")]
        public string BenchmarkInterestRate{
            get{
                return this.benchmarkInterestRate;
            }
            set{
                this.benchmarkInterestRate = value;
            }
        }

        [XmlAttribute("hypotheticalIRSpreadsCurveID")]
        public int HypotheticalIRSpreadsCurveID{
            get{
                return this.hypotheticalIRSpreadsCurveID;
            }
            set{
                this.hypotheticalIRSpreadsCurveID = value;
            }
        }

        [XmlAttribute("dollarOffsetTestingStatus")]
        public bool XmlDollarOffsetTestingStatus{
            get{
                return this.dollarOffsetTestingStatus.Value;
            }
            set{
            }
        }

        [XmlAttribute("dollarOffsetTestingEffectiveness")]
        public double XmlDollarOffsetTestingEffectiveness{
            get{
                return this.dollarOffsetTestingEffectiveness.Value;
            }
            set{
            }
        }

        [XmlAttribute("regressionTestingStatus")]
        public bool XmlRegressionTestingStatus{
            get{
                return this.regressionTestingStatus.Value;
            }
            set{
            }
        }

        [XmlAttribute("regressionRSquare")]
        public double XmlRegressionRSquare{
            get{
                return this.regressionRSquare.Value;
            }
            set{
            }
        }

        [XmlAttribute("regressionSlope")]
        public double XmlRegressionSlope{
            get{
                return this.regressionSlope.Value;
            }
            set{
            }
        }

        [XmlAttribute("regressionTTest")]
        public double XmlRegressionTTest{
            get{
                return this.regressionTTest.Value;
            }
            set{
            }
        }

        [XmlAttribute("regressionFTest")]
        public double XmlRegressionFTest{
            get{
                return this.regressionFTest.Value;
            }
            set{
            }
        }

        [XmlIgnore]
        public bool XmlDollarOffsetTestingStatusSpecified{
            get{
                return this.dollarOffsetTestingStatus.HasValue;
            }
        }

        [XmlIgnore]
        public bool XmlDollarOffsetTestingEffectivenessSpecified{
            get{
                return this.dollarOffsetTestingEffectiveness.HasValue;
            }
        }

        [XmlIgnore]
        public bool XmlRegressionTestingStatusSpecified{
            get{
                return this.regressionTestingStatus.HasValue;
            }
        }

        [XmlIgnore]
        public bool XmlRegressionRSquareSpecified{
            get{
                return this.regressionRSquare.HasValue;
            }
        }

        [XmlIgnore]
        public bool XmlRegressionSlopeSpecified{
            get{
                return this.regressionSlope.HasValue;
            }
        }

        [XmlIgnore]
        public bool XmlRegressionTTestSpecified{
            get{
                return this.regressionTTest.HasValue;
            }
        }

        [XmlIgnore]
        public bool XmlRegressionFTestSpecified{
            get{
                return this.regressionFTest.HasValue;
            }
        }

        #region Child Collections

        /*[XmlArray("FlexibleCFHedgeRegressionValuations")]
        [XmlArrayItem("FlexibleCFHedgeRegressionValuation")]
        public List<FlexibleCFHedgeRegressionValuationEntity> FlexibleCFHedgeRegressionValuationEntityList
        {
            get { return regressionValuationEntityList; }
            set { regressionValuationEntityList = value; }
        }

        [XmlArray("FlexibleCFHedgeLinearRegressionInputs")]
        [XmlArrayItem("FlexibleCFHedgeLinearRegressionInput")]
        public List<FlexibleCFHedgeLinearRegressionInputEntity> FlexibleCFHedgeLinearRegressionInputEntityList
        {
            get { return linearRegressionInputEntityList; }
            set { linearRegressionInputEntityList = value; }
        }*/

        #endregion

        #region Related Columns

        [XmlAttribute("hedgeReportingSpecificationName")]
        public string HedgeReportingSpecificationName{
            get{
                return this.hedgeReportingSpecificationName;
            }
            set{
                this.hedgeReportingSpecificationName = value;
            }
        }

        [XmlAttribute("reportingCurrencyID")]
        public int ReportingCurrencyID{
            get{
                return this.reportingCurrencyID;
            }
            set{
                this.reportingCurrencyID = value;
            }
        }

        #endregion

        #region Nullable variables

        [XmlAttribute("endDate")]
        public DateTime XmlEndDate{
            get{
                return this.endDate.Value;
            }
            set{
            }
        }

        [XmlAttribute("useCleanFairValue")]
        public bool XmlUseCleanFairValue{
            get{
                return this.useCleanFairValue.Value;
            }
        }

        [XmlAttribute("optionExcludeTimeValue")]
        public bool XmlOptionExcludeTimeValue{
            get{
                return this.optionExcludeTimeValue.Value;
            }
        }

        #endregion

        #region Specified Properties

        // These are special markup for XML generator

        [XmlIgnore]
        public bool XmlEndDateSpecified{
            get{
                return this.endDate.HasValue;
            }
        }
        [XmlIgnore]
        public bool XmlOptionExcludeTimeValueSpecified{
            get{
                return this.OptionExcludeTimeValue.HasValue;
            }
        }
        [XmlIgnore]
        public bool XmlUseCleanFairValueSpecified{
            get{
                return this.UseCleanFairValue.HasValue;
            }
        }

        #endregion
    }
}